package com.Logistics.pdbase.service.impl;

import com.Logistics.mycommon.pojo.pdbase.PdGoodsType;
import com.Logistics.pdbase.mapper.PdGoodsTypeMapper;
import com.Logistics.pdbase.service.PdGoodsTypeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 货物类型表 服务实现类
 * </p>
 *
 * @author PinDaLogistics
 * @since 2024-08-05
 */
@Service
public class PdGoodsTypeServiceImpl extends ServiceImpl<PdGoodsTypeMapper, PdGoodsType> implements PdGoodsTypeService {

    @Autowired
    private PdGoodsTypeMapper pdGoodsTypeMapper;

    @Override
    public List<PdGoodsType> selectByName(String name) {
        QueryWrapper<PdGoodsType> pdGoodsTypeQueryWrapper = new QueryWrapper<>();
        pdGoodsTypeQueryWrapper.like("name",name);
        List<PdGoodsType> pdGoodsTypes = pdGoodsTypeMapper.selectList(pdGoodsTypeQueryWrapper);
        return pdGoodsTypes;
    }
}
